package com.example.pictureManage.service.mainViewService;

import com.example.pictureManage.FileNode;
import com.example.pictureManage.service.mainViewStage;
import com.example.pictureManage.util.FileUtil;
import javafx.scene.control.Label;
import javafx.scene.control.TreeView;
import javafx.scene.layout.TilePane;
import java.nio.file.Path;
/**
 * 控制文件目录
 * */
public class fileService {

    public void updateDirectoryTree(Path folder, TreeView<String> directoryTree, TilePane contentPane,Label fileDetail) {
        //设置根目录
        FileNode root = new FileNode(FileUtil.getFileName(folder), folder);
        FileUtil.fillTree(folder, root);
        directoryTree.setRoot(root);
        directoryTree.setShowRoot(true);
    }
}
